\(\int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx\) [1157]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 32, antiderivative size = 82 \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=-\frac {i \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{\sqrt {c-i d} f} \]

[Out]

-I*arctanh(2^(1/2)*a^(1/2)*(c+d*tan(f*x+e))^(1/2)/(c-I*d)^(1/2)/(a+I*a*tan(f*x+e))^(1/2))*2^(1/2)*a^(1/2)/f/(c
-I*d)^(1/2)

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {3625, 214} \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=-\frac {i \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{f \sqrt {c-i d}} \]

[In]

Int[Sqrt[a + I*a*Tan[e + f*x]]/Sqrt[c + d*Tan[e + f*x]],x]

[Out]

((-I)*Sqrt[2]*Sqrt[a]*ArcTanh[(Sqrt[2]*Sqrt[a]*Sqrt[c + d*Tan[e + f*x]])/(Sqrt[c - I*d]*Sqrt[a + I*a*Tan[e + f
*x]])])/(Sqrt[c - I*d]*f)

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 3625

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
-2*a*(b/f), Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {\left (2 i a^2\right ) \text {Subst}\left (\int \frac {1}{a c-i a d-2 a^2 x^2} \, dx,x,\frac {\sqrt {c+d \tan (e+f x)}}{\sqrt {a+i a \tan (e+f x)}}\right )}{f} \\ & = -\frac {i \sqrt {2} \sqrt {a} \text {arctanh}\left (\frac {\sqrt {2} \sqrt {a} \sqrt {c+d \tan (e+f x)}}{\sqrt {c-i d} \sqrt {a+i a \tan (e+f x)}}\right )}{\sqrt {c-i d} f} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.41 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.02 \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=-\frac {i \sqrt {2} a \arctan \left (\frac {\sqrt {-a c+i a d} \sqrt {a+i a \tan (e+f x)}}{\sqrt {2} a \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a c+i a d} f} \]

[In]

Integrate[Sqrt[a + I*a*Tan[e + f*x]]/Sqrt[c + d*Tan[e + f*x]],x]

[Out]

((-I)*Sqrt[2]*a*ArcTan[(Sqrt[-(a*c) + I*a*d]*Sqrt[a + I*a*Tan[e + f*x]])/(Sqrt[2]*a*Sqrt[c + d*Tan[e + f*x]])]
)/(Sqrt[-(a*c) + I*a*d]*f)

Maple [B] (verified)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 211 vs. \(2 (62 ) = 124\).

Time = 1.71 (sec) , antiderivative size = 212, normalized size of antiderivative = 2.59

method result size
derivativedivides \(\frac {\left (-i d \tan \left (f x +e \right )+i c -c \tan \left (f x +e \right )-d \right ) a \ln \left (\frac {3 a c +i a \tan \left (f x +e \right ) c -i a d +3 a d \tan \left (f x +e \right )+2 \sqrt {2}\, \sqrt {-a \left (i d -c \right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right ) \left (c +d \tan \left (f x +e \right )\right )}}{\tan \left (f x +e \right )+i}\right ) \sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {2}}{2 f \sqrt {-a \left (i d -c \right )}\, \left (-\tan \left (f x +e \right )+i\right ) \left (i c -d \right ) \sqrt {a \left (1+i \tan \left (f x +e \right )\right ) \left (c +d \tan \left (f x +e \right )\right )}}\) \(212\)
default \(\frac {\left (-i d \tan \left (f x +e \right )+i c -c \tan \left (f x +e \right )-d \right ) a \ln \left (\frac {3 a c +i a \tan \left (f x +e \right ) c -i a d +3 a d \tan \left (f x +e \right )+2 \sqrt {2}\, \sqrt {-a \left (i d -c \right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right ) \left (c +d \tan \left (f x +e \right )\right )}}{\tan \left (f x +e \right )+i}\right ) \sqrt {c +d \tan \left (f x +e \right )}\, \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {2}}{2 f \sqrt {-a \left (i d -c \right )}\, \left (-\tan \left (f x +e \right )+i\right ) \left (i c -d \right ) \sqrt {a \left (1+i \tan \left (f x +e \right )\right ) \left (c +d \tan \left (f x +e \right )\right )}}\) \(212\)

[In]

int((a+I*a*tan(f*x+e))^(1/2)/(c+d*tan(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

1/2/f*(-I*d*tan(f*x+e)+I*c-c*tan(f*x+e)-d)*a*ln((3*a*c+I*a*tan(f*x+e)*c-I*a*d+3*a*d*tan(f*x+e)+2*2^(1/2)*(-a*(
I*d-c))^(1/2)*(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2))/(tan(f*x+e)+I))*(c+d*tan(f*x+e))^(1/2)*(a*(1+I*tan(
f*x+e)))^(1/2)*2^(1/2)/(-a*(I*d-c))^(1/2)/(-tan(f*x+e)+I)/(I*c-d)/(a*(1+I*tan(f*x+e))*(c+d*tan(f*x+e)))^(1/2)

Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (58) = 116\).

Time = 0.24 (sec) , antiderivative size = 259, normalized size of antiderivative = 3.16 \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=\frac {1}{2} \, \sqrt {-\frac {2 i \, a}{{\left (i \, c + d\right )} f^{2}}} \log \left ({\left ({\left (i \, c + d\right )} f \sqrt {-\frac {2 i \, a}{{\left (i \, c + d\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right )} e^{\left (-i \, f x - i \, e\right )}\right ) - \frac {1}{2} \, \sqrt {-\frac {2 i \, a}{{\left (i \, c + d\right )} f^{2}}} \log \left ({\left ({\left (-i \, c - d\right )} f \sqrt {-\frac {2 i \, a}{{\left (i \, c + d\right )} f^{2}}} e^{\left (i \, f x + i \, e\right )} + \sqrt {2} \sqrt {\frac {{\left (c - i \, d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + c + i \, d}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}\right )} e^{\left (-i \, f x - i \, e\right )}\right ) \]

[In]

integrate((a+I*a*tan(f*x+e))^(1/2)/(c+d*tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

1/2*sqrt(-2*I*a/((I*c + d)*f^2))*log(((I*c + d)*f*sqrt(-2*I*a/((I*c + d)*f^2))*e^(I*f*x + I*e) + sqrt(2)*sqrt(
((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*(e^(2*I
*f*x + 2*I*e) + 1))*e^(-I*f*x - I*e)) - 1/2*sqrt(-2*I*a/((I*c + d)*f^2))*log(((-I*c - d)*f*sqrt(-2*I*a/((I*c +
 d)*f^2))*e^(I*f*x + I*e) + sqrt(2)*sqrt(((c - I*d)*e^(2*I*f*x + 2*I*e) + c + I*d)/(e^(2*I*f*x + 2*I*e) + 1))*
sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*(e^(2*I*f*x + 2*I*e) + 1))*e^(-I*f*x - I*e))

Sympy [F]

\[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=\int \frac {\sqrt {i a \left (\tan {\left (e + f x \right )} - i\right )}}{\sqrt {c + d \tan {\left (e + f x \right )}}}\, dx \]

[In]

integrate((a+I*a*tan(f*x+e))**(1/2)/(c+d*tan(f*x+e))**(1/2),x)

[Out]

Integral(sqrt(I*a*(tan(e + f*x) - I))/sqrt(c + d*tan(e + f*x)), x)

Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 3634 vs. \(2 (58) = 116\).

Time = 0.52 (sec) , antiderivative size = 3634, normalized size of antiderivative = 44.32 \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=\text {Too large to display} \]

[In]

integrate((a+I*a*tan(f*x+e))^(1/2)/(c+d*tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-1/4*(sqrt(2*c^2 + 2*d^2)*(2*sqrt(2)*arctan2((sqrt(c^2 + d^2)*d*cos(f*x + e) - sqrt(c^2 + d^2)*c*sin(f*x + e)
+ (c^2 + d^2)*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*
(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2
))^(1/4)*sin(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/
(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2
+ d^2)/(c^2 + d^2))))/(c^2 + d^2), -(sqrt(c^2 + d^2)*c*cos(f*x + e) + sqrt(c^2 + d^2)*d*sin(f*x + e) - (c^2 +
d^2)*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^
2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))^(1/4)*
cos(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^
2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c
^2 + d^2))))/(c^2 + d^2)) - I*sqrt(2)*log(((c^2 + d^2)*sqrt(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x
+ e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2
+ d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))*cos(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 -
(c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e
)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2)))^2 + (c^2 + d^2)*sqrt(((c^2 + d^2)*cos(f*x + e)^4 +
 (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*
cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))*sin(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 -
c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c
^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2)))^2 + (c^2 + d^2)*cos(f*x + e)^
2 + (c^2 + d^2)*sin(f*x + e)^2 - 2*(sqrt(c^2 + d^2)*c*cos(f*x + e) + sqrt(c^2 + d^2)*d*sin(f*x + e))*(((c^2 +
d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e
)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))^(1/4)*cos(1/2*arctan
2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos
(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))) +
2*(sqrt(c^2 + d^2)*d*cos(f*x + e) - sqrt(c^2 + d^2)*c*sin(f*x + e))*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)
*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)
^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))^(1/4)*sin(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*si
n(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d
^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))))/(c^2 + d^2)))*sqrt(a)*sqrt(c + sqr
t(c^2 + d^2)) - sqrt(2*c^2 + 2*d^2)*(-2*I*sqrt(2)*arctan2((sqrt(c^2 + d^2)*d*cos(f*x + e) - sqrt(c^2 + d^2)*c*
sin(f*x + e) + (c^2 + d^2)*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(
f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^
2)/(c^2 + d^2))^(1/4)*sin(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*s
in(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x
+ e)^2 + c^2 + d^2)/(c^2 + d^2))))/(c^2 + d^2), -(sqrt(c^2 + d^2)*c*cos(f*x + e) + sqrt(c^2 + d^2)*d*sin(f*x +
 e) - (c^2 + d^2)*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e)
+ 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 +
 d^2))^(1/4)*cos(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x +
e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 +
c^2 + d^2)/(c^2 + d^2))))/(c^2 + d^2)) - sqrt(2)*log(((c^2 + d^2)*sqrt(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^
2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x +
e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))*cos(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*
x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*
cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2)))^2 + (c^2 + d^2)*sqrt(((c^2 + d^2)*cos(f
*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((
c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))*sin(1/2*arctan2(-2*(c*d*cos(f*
x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*
x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2)))^2 + (c^2 + d^2)*co
s(f*x + e)^2 + (c^2 + d^2)*sin(f*x + e)^2 - 2*(sqrt(c^2 + d^2)*c*cos(f*x + e) + sqrt(c^2 + d^2)*d*sin(f*x + e)
)*(((c^2 + d^2)*cos(f*x + e)^4 + (c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*
cos(f*x + e)^2 + 2*((c^2 + d^2)*cos(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))^(1/4)*cos
(1/2*arctan2(-2*(c*d*cos(f*x + e)^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2),
 (4*c*d*cos(f*x + e)*sin(f*x + e) + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2
+ d^2))) + 2*(sqrt(c^2 + d^2)*d*cos(f*x + e) - sqrt(c^2 + d^2)*c*sin(f*x + e))*(((c^2 + d^2)*cos(f*x + e)^4 +
(c^2 + d^2)*sin(f*x + e)^4 + 8*c*d*cos(f*x + e)*sin(f*x + e) + 2*(c^2 - d^2)*cos(f*x + e)^2 + 2*((c^2 + d^2)*c
os(f*x + e)^2 - c^2 + d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))^(1/4)*sin(1/2*arctan2(-2*(c*d*cos(f*x + e)
^2 - c*d*sin(f*x + e)^2 - (c^2 - d^2)*cos(f*x + e)*sin(f*x + e))/(c^2 + d^2), (4*c*d*cos(f*x + e)*sin(f*x + e)
 + (c^2 - d^2)*cos(f*x + e)^2 - (c^2 - d^2)*sin(f*x + e)^2 + c^2 + d^2)/(c^2 + d^2))))/(c^2 + d^2)))*sqrt(a)*s
qrt(-c + sqrt(c^2 + d^2)))/((c^2 + d^2)*f)

Giac [F(-2)]

Exception generated. \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((a+I*a*tan(f*x+e))^(1/2)/(c+d*tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Error: Bad Argument TypeError: Bad Argument TypeError: Bad Argument TypeError: Bad Argument Typeindex.cc in
dex_m i_lex

Mupad [B] (verification not implemented)

Time = 11.30 (sec) , antiderivative size = 473, normalized size of antiderivative = 5.77 \[ \int \frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {c+d \tan (e+f x)}} \, dx=\frac {\sqrt {2}\,\sqrt {a}\,\mathrm {atan}\left (\frac {2\,\sqrt {-c+d\,1{}\mathrm {i}}\,\left (\sqrt {2}\,c^{3/2}\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,1{}\mathrm {i}-\sqrt {2}\,\sqrt {c}\,d\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}-\sqrt {2}\,\sqrt {a}\,c\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}+\sqrt {2}\,\sqrt {a}\,\sqrt {c}\,\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,1{}\mathrm {i}+\sqrt {2}\,\sqrt {a}\,d\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}+\sqrt {2}\,\sqrt {a}\,\sqrt {c}\,d-\sqrt {2}\,c\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,1{}\mathrm {i}-\sqrt {2}\,d\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}+\sqrt {2}\,\sqrt {a}\,\sqrt {c}\,d\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}{\sqrt {a}\,d^2\,\mathrm {tan}\left (e+f\,x\right )+\sqrt {a}\,d\,\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )+\sqrt {a}\,c\,d-6\,\sqrt {c}\,d\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}+4\,\sqrt {a}\,\sqrt {c}\,d\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}+c^2\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,2{}\mathrm {i}+d^2\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,2{}\mathrm {i}+\sqrt {a}\,c^2\,1{}\mathrm {i}-\sqrt {a}\,d^2\,2{}\mathrm {i}-\sqrt {a}\,c^{3/2}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,4{}\mathrm {i}+\sqrt {a}\,c\,\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,3{}\mathrm {i}-c^{3/2}\,\sqrt {a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}\,\sqrt {c+d\,\mathrm {tan}\left (e+f\,x\right )}\,2{}\mathrm {i}+\sqrt {a}\,c\,d\,\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}}\right )\,1{}\mathrm {i}}{f\,\sqrt {-c+d\,1{}\mathrm {i}}} \]

[In]

int((a + a*tan(e + f*x)*1i)^(1/2)/(c + d*tan(e + f*x))^(1/2),x)

[Out]

(2^(1/2)*a^(1/2)*atan((2*(d*1i - c)^(1/2)*(2^(1/2)*c^(3/2)*(a + a*tan(e + f*x)*1i)^(1/2)*1i - 2^(1/2)*c^(1/2)*
d*(a + a*tan(e + f*x)*1i)^(1/2) - 2^(1/2)*a^(1/2)*c*(c + d*tan(e + f*x))^(1/2)*1i + 2^(1/2)*a^(1/2)*c^(1/2)*(c
 + d*tan(e + f*x))*1i + 2^(1/2)*a^(1/2)*d*(c + d*tan(e + f*x))^(1/2) + 2^(1/2)*a^(1/2)*c^(1/2)*d - 2^(1/2)*c*(
a + a*tan(e + f*x)*1i)^(1/2)*(c + d*tan(e + f*x))^(1/2)*1i - 2^(1/2)*d*(a + a*tan(e + f*x)*1i)^(1/2)*(c + d*ta
n(e + f*x))^(1/2) + 2^(1/2)*a^(1/2)*c^(1/2)*d*tan(e + f*x)*1i))/(c^2*(a + a*tan(e + f*x)*1i)^(1/2)*2i + d^2*(a
 + a*tan(e + f*x)*1i)^(1/2)*2i + a^(1/2)*c^2*1i - a^(1/2)*d^2*2i - a^(1/2)*c^(3/2)*(c + d*tan(e + f*x))^(1/2)*
4i + a^(1/2)*d^2*tan(e + f*x) + a^(1/2)*c*(c + d*tan(e + f*x))*3i + a^(1/2)*d*(c + d*tan(e + f*x)) - c^(3/2)*(
a + a*tan(e + f*x)*1i)^(1/2)*(c + d*tan(e + f*x))^(1/2)*2i + a^(1/2)*c*d - 6*c^(1/2)*d*(a + a*tan(e + f*x)*1i)
^(1/2)*(c + d*tan(e + f*x))^(1/2) + a^(1/2)*c*d*tan(e + f*x)*3i + 4*a^(1/2)*c^(1/2)*d*(c + d*tan(e + f*x))^(1/
2)))*1i)/(f*(d*1i - c)^(1/2))